﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using eschoolBO;

namespace ESCHOOL.parents
{
    public partial class WebForm3 : System.Web.UI.Page
    {
        student stud = new student();
        parent par = new parent();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt = par.GetRecords(Convert.ToInt64(Session["userid"]), "", "", "", "", "", "", "", -99, "", -99, "", "",-99,"","", false, " and ");
                if (dt.Rows.Count > 0)
                {
                    DataTable dt1 = stud.GetRecords(Convert.ToInt64(dt.Rows[0]["student_id"].ToString()), "", -99, -99, "", "", "", "", "", "", -99, -99, "", -99, "", "","","", false, " and ");
                    DetailsView1.DataSource = dt1;
                    DetailsView1.DataBind();
                }
            }
        }

        protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e)
        {

        }
    }
}
